package com.service.impl;

import java.util.List;

import com.dao.NewDao;
import com.dao.impl.NewDaoImpl;
import com.entity.New;
import com.entity.page.Page;
import com.entity.vo.NewVo;
import com.exception.DaoException;
import com.service.NewService;

public class NewServiceImpl implements NewService {

	NewDao newDao = new NewDaoImpl();
	
	@Override
	public List<New> selectNewsByTid(Integer tid) throws DaoException {
		return newDao.selectNewsByTid(tid);
	}

	@Override
	public New selectNewById(Integer id) throws DaoException {
		return newDao.selectNewById(id);
	}

	@Override
	public Page<New> selectNewsByPage(Integer page, Integer row,NewVo newVo) throws DaoException {
		return newDao.selectNewsByPage(page, row,newVo);
	}

	@Override
	public int selectNewsCount() throws DaoException {
		return newDao.selectNewsCount();
	}

	@Override
	public boolean updateNewByImage(Integer id, String imgPath) throws DaoException {
		return newDao.updateNewByImage(id,imgPath);
	}

}
